package com.ruoyi.exception;

import lombok.Getter;

@Getter
public enum GlobalErrorCodeEnum {
    OK("成功！","1"),
    ERROR("失败！","-1"),
    JSR303("JSR303异常错误","1001"),
    FALLBACK("服务不可用！", "-2"),
    PARAMETER_EXCEPTION("参数异常","-3"),
    //common 2xxx开头
    COMMON_PHONE_FORMAT("手机号格式错误!","2001"),
    COMMON_IS_NULL("参数不能为空!","2002"),
    COMMON_CODE_IS_NULL("图形验证码不能为空!","2003"),
    COMMON_REDISTIME_OVRE("请输入验证码!不要重复获取！","2004"),
    COMMON_CODE_ERROR("图形验证码错误！","2005"),
    COMMON_BLACK("用户已在黑名单","2006"),
    COMMON_BLACK_ADMIN("您已经被禁⽤发送短信验证码，请联系管理员","2007"),
    //user 3xxx
    USER_PHONE_FORMAT("手机格式错误！","3001"),
    USER_PHONE_CODE("手机验证码错误！","3002"),
    USER_PHONE_ATYPISM("手机验证码不一致！","3003"),
    USER_PHONE_EXISTS_ERROR("手机号已注册！", "3004"),
    USER_REGISTER_ERROR("注册失败，请重试！", "3005"),
    USER_IS_RECOMMEND("该用户已推荐！","3006"),

    //course
    COURSE_EXISTENCE_ERROR("课程已存在！","4001")
    ;
    private String message;

    private String code;

    GlobalErrorCodeEnum(String message, String code) {
        this.message = message;
        this.code = code;
    }
}
